#ifndef _DATA_THREAD_H_
#define _DATA_THREAD_H_
#include <stdio.h>
#include "typedef.h"
#include <pthread.h>

#ifndef THR_LOCAL
#define THR_LOCAL __thread
#endif

typedef struct FileCopyStatis {
    uint64 copy_buff_time;
    uint64 write_buff_time;
    uint64 hack_buff_time;
    uint64 close_file_time;
} FileCopyStatis;

typedef struct MyThreadHandle{
    pthread_t  thread_ptr;
    int thrd_no;
    bool finish;
    FileCopyStatis fc_sta;
    char *base_buff;
    char *hack_buff;
}MyThreadHandle;

void run_copyfile_thread(int thrd_num, int files,char* filepath);

#endif